﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.DirectX.Direct3D;
using Microsoft.DirectX;

namespace DirectX_CS
{
    public delegate void IBChangedDelegate(object sender, int numIndices);

	public interface IManagedIndexBuffer
	{
		event VBChangedDelegate VertexBufferChanged;
		event IBChangedDelegate IndexBufferChanged;
		//object GetVertices(); //SVector[]
		Array GetIndices(); //int[]
		int GetIndicesCount();
		int NumberFaces { get; }
		//int GetVerticesCount();
		void RenderIndexedPrimitives(PrimitiveManager caller, int vbDataLength, int ibDataLength);
		bool EnableCallRenderIndexedPrimitives { get; set; }
		/*
		//BEGIN WORKING CODE
		for (int rowIdx = 0; rowIdx < EvalsY; rowIdx++)
		{
			int vertexStart = offsetStart + rowIdx * EvalsX;
			mDevice.DrawPrimitives(PrimitiveType.LineStrip, vertexStart, EvalsX - 1); //was drawing mRVA WHICH WAS AN ERROR
		}
		//OR FOR EXAMPLE: mDevice.DrawUserPrimitives(PrimitiveType.LineStrip,  VertexCount - 1, 0); 			//allows user to set stream
		//END WORKING CODE
		*/

		VertexFormats VertexFormat { get; }
		
        void ManagerDestroyed(PrimitiveManager caller);

	}
}
